package com.zdb.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Setter
@Getter
@TableName("zdb_pms_user")
public class User {
    @TableId("id")
    private int id;              //用户编号
    @TableField("pid")
    private int pid;             //省份id
    @TableField("cid")
    private int cid;             //城市id
    @TableField("did")
    private int did;             //区县id
    @TableField("school_address")
    private String schoolAddress;  //学校地址
    private int building;        //楼栋
    @TableField("room_number")
    private String roomNumber;     //门牌号
    private String name;            //姓名
    @TableField("sex")
    private int sex;             //性别
    private String phone;           //电话号码
    private String qq;              //QQ
    private String weixin;          //微信
    private String educational;     //当前学历
    @TableField("start_time")
    private Date startTime;        //开始时间
    @TableField("end_time")
    private Date endTime;          //结束时间
//    @Column(name = "aid")
//    private int aid;
    @TableField("avatar_address") //头像地址
    private String avatarAddress;
    @TableField("the_public")    //公众号
    private String thePublic;
    @TableField("birth_date")    //出生日期
    private String birthDate;
    @TableField("nickname")    //昵称
    private String nickName;
    @TableField("salt")    //密码加密的salt值
    private String salt;
    @TableField(exist = false)
    private String pcd;             //将查询到的省市区名称进行拼接
    @TableField(exist = false)
    private List<Address> listAddress;  //从收货地址表中拿到一个用户的所有收货地址

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public int getCid() {
        return cid;
    }

    public void setCid(int cid) {
        this.cid = cid;
    }

    public int getDid() {
        return did;
    }

    public void setDid(int did) {
        this.did = did;
    }

    public String getSchoolAddress() {
        return schoolAddress;
    }

    public void setSchoolAddress(String schoolAddress) {
        this.schoolAddress = schoolAddress;
    }

    public int getBuilding() {
        return building;
    }

    public void setBuilding(int building) {
        this.building = building;
    }

    public String getRoomNumber() {
        return roomNumber;
    }

    public void setRoomNumber(String roomNumber) {
        this.roomNumber = roomNumber;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getWeixin() {
        return weixin;
    }

    public void setWeixin(String weixin) {
        this.weixin = weixin;
    }

    public String getEducational() {
        return educational;
    }

    public void setEducational(String educational) {
        this.educational = educational;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getAvatarAddress() {
        return avatarAddress;
    }

    public void setAvatarAddress(String avatarAddress) {
        this.avatarAddress = avatarAddress;
    }

    public String getThePublic() {
        return thePublic;
    }

    public void setThePublic(String thePublic) {
        this.thePublic = thePublic;
    }

    public String getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(String birthDate) {
        this.birthDate = birthDate;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getPcd() {
        return pcd;
    }

    public void setPcd(String pcd) {
        this.pcd = pcd;
    }

    public List<Address> getListAddress() {
        return listAddress;
    }

    public void setListAddress(List<Address> listAddress) {
        this.listAddress = listAddress;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", pid=" + pid +
                ", cid=" + cid +
                ", did=" + did +
                ", schoolAddress='" + schoolAddress + '\'' +
                ", building=" + building +
                ", roomNumber='" + roomNumber + '\'' +
                ", name='" + name + '\'' +
                ", sex=" + sex +
                ", phone='" + phone + '\'' +
                ", qq='" + qq + '\'' +
                ", weixin='" + weixin + '\'' +
                ", educational='" + educational + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", avatarAddress='" + avatarAddress + '\'' +
                ", thePublic='" + thePublic + '\'' +
                ", birthDate='" + birthDate + '\'' +
                ", nickName='" + nickName + '\'' +
                ", salt='" + salt + '\'' +
                ", pcd='" + pcd + '\'' +
                ", listAddress=" + listAddress +
                '}';
    }
}
